Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: OpenDoc Class Reference /
Part 1 - Classes and Methods / ODContainer


AcquireDocument

Document Shell

The AcquireDocument method returns a reference to the document object associated with the specified document ID.

ODDocument AcquireDocument (in ODDocumentID id);
id
The ID of the requested document.
return value
A reference to the specified document object.
DISCUSSION
The document shell or container application calls this method when the user opens an OpenDoc document.

This method looks in this container object for the document object associated with the specified document ID. If such a document object exists, the object is returned. If the target document object does not exist, it is created, initialized, and returned.

This method increments the reference count of the returned document object. When the caller has finished using that document, it should call the document's Release method.

EXCEPTIONS
kODErrDocumentDoesNotExists
The specified document does not exist.
SEE ALSO
The ODDocumentID type (page 902).
The ODRefCntObject::Release method (page 577).
The ODDocument class (page 132).
"Creating a New Document" on page 291 in OpenDoc Programmer's Guide.
Table 11-1 on page 466 in OpenDoc Programmer's Guide.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
17 JUL 1996




Navigation graphic, see text links

Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help